package com.asideal;

import org.reflections.util.FilterBuilder.Exclude;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;

import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.asideal.framework.security.filter.AccessFilter;
import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration;
//排除框架自动启动的数据源配置
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class
		,PageHelperAutoConfiguration.class,DruidDataSourceAutoConfigure.class})
@EnableEurekaClient
@EnableZuulProxy
public class AppZuul {
	public static void main(String[] args) {
		SpringApplication.run(AppZuul.class, args);
	}
	/**
     * 资源过滤器
     * @return 资源过滤器
     */
    @Bean
    public AccessFilter accessFilter(){
        return new AccessFilter();
    }
}
